<!-- 头部logo -->
<header class="am-topbar am-topbar-fixed-top wos-header am-g am-container"> 
    <div class="am-container">
        <h1 class="am-topbar-brand">
            <a href="/"><img src="{{$temps_src}}/file/logo1.png" alt=""></a>
        </h1>
        <div class="user_center">
        <div class="am-dropdown" data-am-dropdown>
  <button style="border-color:#Fff;border-radius: 1rem; margin-top: -5px;right:0;" class="am-btn am-topbar-btn am-topbar-toggle am-btn-warning am-btn-sm am-dropdown-toggle" data-am-dropdown-toggle>用户</button>
  <ul class="am-dropdown-content" style="min-width:30px;top:30px;">
    <li><a href="/login">登录</a></li>
    <li><a href="/userinfo">信息</a></li>
    <li><a onclick="logout()" href="javascript:;">退出</a></li>
  </ul>
</div> 
        </div>
        <!-- <a href="/login">
            <button style="border-color:#Fff;border-radius: 1rem;" class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-warning"> 
                登录
            </button> -->
        </a>   
    </div>
</header> 
<!-- 底部导航栏 -->
<div class="am-tabs am-g am-container" data-am-tabs="{noSwipe: 1}" id="nav_bottom" style="padding:0px;">
    <ul class="am-u-sm-12">
        <li class="am-u-sm-3"><a href="/">首页</a></li>
        <li class="am-u-sm-3">  
            <div class="am-dropdown am-dropdown-up" data-am-dropdown="">
                <a href="javascript:;" class="am-dropdown-toggle" data-am-dropdown-toggle="">资讯
                    <span class="iconfont icon-100fangxiang_xiangshang" style="font-size:10px;"></span>
                </a>
                <ul class="am-dropdown-content"> 
                <li><a href="/list/28.html">协会动态</a></li>
                <li><a href="/list/29.html">行业资讯</a></li> 
                <li><a href="/list/30.html">政策法规</a></li>
                <li><a href="/category/14.html">党建之窗</a></li>
                <li><a href="/list/31.html">最新公告</a></li>
                </ul>
            </div> 
        </li> 
        <li class="am-u-sm-3"> 
            <div class="am-dropdown am-dropdown-up" data-am-dropdown="">
                <a href="javascript:;" class="am-dropdown-toggle" data-am-dropdown-toggle="">协会
                    <span class="iconfont icon-100fangxiang_xiangshang" style="font-size:10px;"></span>
                </a>
                <ul class="am-dropdown-content"> 
                <li> <a href="/page/21.html">协会简介</a></li> 
                <li> <a href="/page/22.html">会长致辞</a></li> 
                <li> <a href="/page/23.html">组织架构</a></li> 
                <li> <a href="/page/24.html">入会须知</a></li> 
                <li> <a href="/page/25.html">入会流程</a></li> 
                <li> <a href="/page/26.html">协会章程</a></li> 
                <li> <a href="/list/19.html">个人会员</a></li> 
                <li> <a href="/list/20.html">企业会员</a></li> 
                </ul>
            </div> 
        </li>
        <li class="am-u-sm-3"> 
            <div class="am-dropdown am-dropdown-up" data-am-dropdown="">
                <a href="javascript:;" class="am-dropdown-toggle" data-am-dropdown-toggle="">服务
                    <span class="iconfont icon-100fangxiang_xiangshang" style="font-size:10px;"></span>
                </a>
                <ul class="am-dropdown-content"> 
                <li> <a href="/list/3.html">技术服务</a></li> 
                <li style="width:104px"> <a href="/category/4.html">培训服务</a></li> 
                <li style="width:104px"> <a href="/category/9.html">人才服务</a></li> 
                <li> <a href="/list/32.html">产品展示</a></li> 
                <li> <a href="/">设备租赁</a></li> 
                </ul>
            </div> 
        </li>
    </ul>
</div>
<script>
    /*退出登录*/
function logout() {
  layui.use(['layer'], function(){
  var layer = layui.layer;
  // 触发确认框
  layer.confirm('确认要退出登录吗？', {icon: 3, title:'提示'}, function(index){
    //发异步请求数据
    $.ajax({
            type: 'GET',
            dataType: 'json',
            url: '/logout',
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            },
            success: function (data) {
                if (data.status_code == 200) {
                    layer.msg('退出登录成功', {
                        icon: 1, time: 1500, end: function () {
                            location.reload()
                        }
                    });
                } else {
                    layer.msg('退出登录失败', {icon: 5, time: 1500}),
                        function () {
                            location.reload()
                        };
                }

            },
            error: function () {

            }

        })
    // 确认执行的回调
    layer.close(index); // 关闭确认框
    // 执行操作后的代码
    console.log('操作执行成功');
    
  });
});
}
</script>  